#!/usr/bin/perl
# edit.cgi
# Display the ucd-snmp edit page

require 'snmp-lib.pl';

&header($text{'edit_title'}, "", "edit", undef, 1);
#print "<hr>\n";

#Get the System information
##########################################################
my $info = `snmpwalk localhost public system 2>&1`;
$info =~ /sysLocation.*=[ \t]*(.+)\n/;
my $sysLocationInfo = $1;
$info =~ /sysContact.*=[ \t]*(.+)\n/;
my $sysContactInfo = $1;

print "<form name=edit method=post action=editinfo.cgi>";
print "<table class=mode1 border=0 width=100%>";
print "<tr><td width=15%><b>sysLocation</b></td>",
	"<td width=85%><input class=text size=80 type=text name=sysLocation value='$sysLocationInfo'></td></tr>",
	"<tr><td><b>sysContact</b></td>",
	"<td><input size=80 class=text type=text name=sysContact value='$sysContactInfo'></td></tr>",
	"</table>";

print "<p><input class=button1 type=submit value=$text{'submit'}></p>";
print "</form>";

#print "<hr>";
&footer("/ucd-snmp/",$text{index_title});
